error:
	@echo Targets are 'mingw' or 'linux' or 'msvc'. See makefile for details.

mingw:
	gcc *.c -o"Peace Invaders.exe" -s -Wall -O3 -lagl -lalleg -lglu32 -lopengl32 -mwindows

mingw_s:
	gcc -DALLEGRO_STATICLINK *.c -o"Peace Invaders.exe" -s -Wall -O3 -lagl_s -lalleg_s -lglu32 -lopengl32 -mwindows -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound

linux:
	gcc *.c -o"Peace Invaders" -s -Wall -O3 -lagl `allegro-config --libs` -lGLU -lGL

msvc:
	cl -D "WIN32" -MT -W1 -O2 *.c -nologo -o"Peace Invaders.exe" alleg.lib glu32.lib opengl32.lib
	
# Do not use these if you plan on distributing the executable. I.e. if you are
# Matthew or Arron or a helper.. The OpenGL version uses some nicer gfx effects
# and the NO_GL versions also don't emulate everything 100%.
mingwNOGL:
	gcc *.c -DNO_GL -o"Peace Invaders NO GL.exe" -s -Wall -O3 -lalleg -mwindows

linuxNOGL:
	gcc *.c -DNO_GL -o"Peace Invaders NO GL" -s -Wall -O3 `allegro-config --libs`

msvcNOGL:
	cl -D "NO_GL" -D "WIN32" -MT -W1 -O2 *.c -nologo -o"Peace Invaders NO GL.exe" alleg.lib

# This is only here for those who use DOS (and no windows). Never distribute.
# It doesn't work properly.
djgppNOGL:
	gcc *.c -DNO_GL -o"Peace Invaders.exe" -s -Wall -O3 -lalleg
